<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<!--
Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.

Use of this source code is governed by a BSD-style license
that can be found in the LICENSE file in the root of the source
tree. An additional intellectual property rights grant can be found
in the file PATENTS.  All contributing project authors may
be found in the AUTHORS file in the root of the source tree.
-->
<html>
<head>
  <title>getUserMedia Browser Conformance Test</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta charset="utf-8">
</head>

<!--
To quickly iterate when developing this test, make sure you select
'Always allow this site to use this webcam' option in the dropdown menu of
Chrome when it's requesting access to your webcam.
Notice that this requires the site you're browsing to use HTTPS.
-->

<body>
  <h1>Conformance test for the Media Capture and Streams API</h1>
  <p>This page contains a foundation of conformance tests that can be expanded
  to cover most things in the W3C specification of the Media Capture and Streams
  API.</p>
  <p>VERSION: These tests are based on the W3C Editor's Draft of August 24th,
  2013
  (<a href="http://dev.w3.org/2011/webrtc/editor/archives/20130824/getusermedia.html">http://dev.w3.org/2011/webrtc/editor/archives/20130824/getusermedia.html</a>)
  <p>STATUS: In its current state, it only performs simple checks on the various
  attributes and methods of the objects exposed by the API. There's not much
  functionality tested so far. The spec doesn't define if an attribute shall be
  owned by the object itself (<code>assert_own_propety</code>) or if it shall be
  inherited (<code>assert_inherits</code>). Since testharness.js doesn't offer
  any generic function that covers both, the method for verification is
  currently chosen according to the current Chrome implementation.</p>
  <p>PREFIXES: These tests currently utilizes the <code>adapter.js</code>
  script, which handle the prefixes used by different browsers.</p>
  <p>HOW TO RUN: The easiest way is to tell your browser to:
  <ul>
  <li>Provide a fake webcam (<code>--use-fake-ui-for-media-stream</code> in
  Chrome)</li>
  <li>Automatically allow access to the webcam
  (<code>--use-fake-device-for-media-stream</code> in Chrome)</li>
  <li>Allow loading HTML files from disk
  (<code>--allow-file-access-from-files</code> in Chrome)</li>
  </ul>
  Then just load this HTML file to execute the tests.</p>

  <div id="log"></div>
  <video width="320" height="240" id="local-view" autoplay="autoplay"
      muted="true"></video>

  <script src="https://w3c-test.org/resources/testharness.js"></script>
  <!-- Load the polyfill to switch-hit between Chrome and Firefox -->
  <script src="https://webrtc.googlecode.com/svn/stable/webrtc/test/manual/adapter.js"></script>

  <script src="getusermedia_conformance_test.js"></script>
</body>
</html>
